<table width="794" cellspacing="0" cellpadding="0">
        <tbody>
            <tr>
                <td>
                    <table width="794" cellspacing="0" cellpadding="0" height="35" style="background-color:#b72027;color:#fff200;">
                        <tbody>
                            <tr>
                                <td width="335px" style="padding:0 20px;vertical-align: middle;">
                                    <div class="left">
                                        <div class="grid-new">
                                            <span style="">Hiển thị theo:</span>
                                            <span class="<?php echo ($listType == 2) ? 'active' : ''; ?>"><a class="grid-r" rel="1" onclick="MyController.getListProduct('list', 2);"></a></span>
                                            <span class="<?php echo ($listType == 1) ? 'active' : ''; ?>"><a href="javascript:;" class="grid-c" rel="2" onclick="MyController.getListProduct('list', 1);"></a></span>
                                        </div>
                                    </div>
                                </td>
                                <td align="right" width="415px" style="padding:0 20px;vertical-align: middle;">
                                <div class="left">
                                    <div class="list_order">
                                        <a class="price_up <?php echo ($cookieOrder == 'price_up') ? 'selected' : ''; ?>" onclick="MyController.setOrder('price_up');">Giá</a> &nbsp;|&nbsp; <a class="price_down <?php echo ($cookieOrder == 'price_down') ? 'selected' : ''; ?>" onclick="MyController.setOrder('price_down');">Giá</a> &nbsp;|&nbsp; <a class="<?php echo ($cookieOrder == 'name_up') ? 'selected' : ''; ?>" onclick="MyController.setOrder('name_up');">A-Z</a>&nbsp;|&nbsp; <a class="<?php echo ($cookieOrder == 'name_down') ? 'selected' : ''; ?>" onclick="MyController.setOrder('name_down');">Z-A</a>
                                    </div>
                                </div>
                                </td>

                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>

        </tbody>
    </table>
<div id="pro-list-view">
    <?php if($listType == 1) {?>
        <div id="prolist-view-hz-or-vt">
        <ul class="pl-horizontal-row">
            <?php foreach ($aryProduct as $key => $product) { ?>
                <li class="pl-horizontal-col">
                <ul>
                    <li class="pl-hz-img">
                        <a href="<?php echo $root_page?>/sanpham/<?php echo $product['product_id']; ?>/<?php echo $product['product_title_filter']; ?>.html" title="<?php echo $product['product_title']; ?>">
                            <img src="<?php echo $root_page . $product['product_main_image']; ?>" alt="<?php echo $product['product_title_filter']; ?>" title="<?php echo $product['product_title']; ?>"/>
                        </a>
                    </li>
                    <li class="pl-hz-name">
                        <a href="<?php echo $root_page?>/sanpham/<?php echo $product['product_id']; ?>/<?php echo $product['product_title_filter']; ?>.html" title="<?php echo $product['product_title']; ?>"><?php echo $product['product_title']; ?></a>
                    </li>
                    <?php if ($product['product_price_active_km'] == 1) { ?>
                        <li class="pl-hz-price">
                            <span><?php echo number_format($product['product_price_vnd_km'], 0, ',', '.'); ?>&nbsp;VNĐ</span>
                        </li>
                    <?php } ?>
                        <li class="pl-hz-pricesale"><span><?php echo ($product['product_price_vnd'] != 0) ? number_format($product['product_price_vnd'], 0, ',', '.') . '&nbsp;VNĐ' : 'Call'; ?></span></li>

                    <li class="pl-hz-compare">
                        <input class="inputCompare" type="checkbox" id="<?php echo $product['product_id'];?>" onclick="MyController.addCompareList(<?php echo $product['product_id'];?>)"><span style="cursor: pointer;" onclick="MyController.compareItem();">Chọn so sánh</span>
                    </li>
                    <?php if (in_array($product['product_id'], $aryOrderProductId)) { ?>
                    <li style="text-align: center;">
                        <div>
                            Đã có trong giỏ hàng
                        </div>
                        <div>
                            <a href="/order/chi-tiet-gio-hang.html" title="Xem giỏ hàng" style="color: red;">Xem giỏ hàng</a>
                        </div>
                    </li>
                    <?php }else{ ?>
                    <li style="text-align: center" id="product_order_<?php echo $product['product_id']; ?>">
                        <div class="btnorder_r" onclick="MyController.addProductToShopCat(<?php echo $product['product_id']; ?>, <?php echo $product['product_category_id']; ?>);"></div>
                    </li>
                    <?php } ?>
                </ul>
                <div class="pl-horizontal-col-hover" style="top: 663px; left: 248px;">
                    <ul>
                        <li class="pl-horizontal-col-hover-top">
                            <span class="pl-hz-name"><?php echo $product['product_title']; ?></span>
                            <span class="pl-hz-price">Giá: <?php echo ($product['product_price_vnd'] != 0) ? number_format($product['product_price_vnd'], 0, ',', '.') . '&nbsp;VNĐ' : 'Call'; ?></span>
                        </li>
                        <li class="pl-horizontal-col-hover-center">
                            <span class="pl-hz-title">KHUYẾN MÃI</span>
                            <span class="pl-hz-promotion">
                                <?php
                                $product_promotional = str_replace("\n", '<br>', $product['product_promotional']);
                                $product_promotional = str_replace("\r", '<br>', $product_promotional);
                                $product_promotional = str_replace("\"", '', $product_promotional);
                                ?>
                                <?php echo $product_promotional;?>
                            </span>
                        </li>
                        <li class="pl-horizontal-col-hover-bottom">
                            <span class="pl-hz-title">TÍNH NĂNG NỔI BẬT</span>
                            <span class="pl-hz-summary">
                                <?php
                                $productHiglight = str_replace("\n", '<br>', $product['product_highlight']);
                                $productHiglight = str_replace("\r", '<br>', $productHiglight);
                                $productHiglight = str_replace("\"", '', $productHiglight);
                                ?>
                                <?php echo $productHiglight;?>
                                <p>&nbsp;</p>
                            </span>
                        </li>
                    </ul>
                </div>
            </li>
            <?php } ?>
        </ul>
        <div class="clear"></div>

    </div>
    <div class="clear" style="height: 10px;"></div>
    <?php } ?>
    
    <?php if ($listType == 2) {?>
        <div class="list2">
<?php foreach ($aryProduct as $key => $product) { ?>
                                <div class="item">
                                    <div class="left">
                                        <div class="border">
<?php if ($product['product_type_id'] == 1) { ?>
                                    <div class="image_new">&nbsp;</div>
<?php } ?>
                                <div class="image">
                                    <div class="divvalign">
                                        <div class="divvalign2">
                                            <a href="<?php echo $root_page;?>/sanpham/<?php echo $product['product_id']; ?>/<?php echo $product['product_title_filter']; ?>.html" title="<?php echo $product['product_title']; ?>"><img src="<?php echo $root_page . $product['product_main_image']; ?>" alt="<?php echo $product['product_title_filter']; ?>" title="<?php echo $product['product_title']; ?>"/></a>
                                        </div>
                                    </div>
                                </div>
                                    <div>
                                        <input class="inputCompare" type="checkbox" id="<?php echo $product['product_id'];?>" onclick="MyController.addCompareList(<?php echo $product['product_id'];?>)"><span style="cursor: pointer;" onclick="MyController.compareItem();">Chọn so sánh</span>
                                    </div>
                            </div>
                        </div>
                        <div class="right">
                            <div class="col2">
                                <div class="name">
                                    <a href="<?php echo $root_page;?>/sanpham/<?php echo $product['product_id']; ?>/<?php echo $product['product_title_filter']; ?>.html" title="<?php echo $product['product_title']; ?>"><?php echo $product['product_title']; ?></a>
                                </div>
                                <div class="item_highlight">
<?php echo $product['product_highlight']; ?>
                            </div>
                            <div><a class="showall" href="<?php echo $root_page;?>/sanpham/<?php echo $product['product_id']; ?>/<?php echo $product['product_title_filter']; ?>.html" title="<?php echo $product['product_title']; ?>">Xem chi tiết</a></div>
                        </div>
                        <div style="display: block;" class="col3">
                            <div class="top">
<?php if ($product['product_price_active_km'] == 1) { ?>
                                    <div class="price">
                                        Giá cũ : <span class="price_older"><?php echo number_format($product['product_price_vnd'], 0, ',', '.'); ?>&nbsp;VNĐ</span>
                                    </div>
                                    <div class="price">
                                        Giá KM : <span class="number"><?php echo number_format($product['product_price_vnd_km'], 0, ',', '.'); ?>&nbsp;VNĐ</span>
                                    </div>
<?php } else { ?>
                                    <div class="price">
                                        Giá bán : <span class="number"><?php echo ($product['product_price_vnd'] != 0) ? number_format($product['product_price_vnd'], 0, ',', '.') . '&nbsp;VNĐ' : 'Call'; ?></span>
                                    </div>
<?php } ?>
                                <div class="vat">
<?php echo ($product['product_is_vat'] == 1) ? 'Đã bao gồm VAT' : 'Chưa bao gồm VAT'; ?>
                            </div>

                            <div align="center" style="padding-left: 10px;">
<?php if (in_array($product['product_id'], $aryOrderProductId)) { ?>
                                    <div>
                                        Đã có trong giỏ hàng
                                    </div>
                                    <div>
                                        <a href="/order/chi-tiet-gio-hang.html" title="Xem giỏ hàng" style="color: red;">Xem giỏ hàng</a>
                                    </div>
<?php } else { ?>
                                    <div id="product_order_<?php echo $product['product_id']; ?>">
                                        <div class="btnorder" onclick="MyController.addProductToShopCat(<?php echo $product['product_id']; ?>, <?php echo $product['product_category_id']; ?>);"></div>
                                    </div>
<?php } ?>

                            </div>
                        </div>
                        <div class="under">
                            <div class="bullet_pro">
                                <?php echo $product['product_promotional']; ?>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="clear">
                </div>
            </div>
<?php } ?>


                        </div>
    <div class="clear" style="height: 10px;"></div>
    <?php } ?>
    
    <table width="794" cellspacing="0" cellpadding="0">
        <tbody>
            <tr>
                <td>
                    <table width="794" cellspacing="0" cellpadding="0" height="35" style="background-color:#b72027;color:#fff200;">
                        <tbody>
                            <tr>
                                <td align="right" style="padding:0 20px;vertical-align: middle;">
                                    <?php echo $strPaging;?>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
            
        </tbody>
    </table>
    <div style="height: 5px;" class="clear">
    </div>
</div>
<input type="hidden" id="productCompareList" value="">